import { createRouter, createWebHistory } from 'vue-router';
import Home from '../pages/Home.vue';
import RestaurantList from '../pages/RestaurantList.vue';
import RestaurantDetail from '../pages/RestaurantDetail.vue';
import UserInfo from '../pages/UserInfo.vue';

const routes = [
    {
        path: '/',
        name: 'Home',
        component: Home,
    },
    {
        path: '/restaurants',
        name: 'RestaurantList',
        component: RestaurantList,
    },
    {
        path: '/restaurants/:id',
        name: 'RestaurantDetail',
        component: RestaurantDetail,
    },
    {
        path: '/user-info',
        name: 'UserInfo',
        component: UserInfo,
    },
];

const router = createRouter({
    history: createWebHistory(),
    routes,
});

export default router;